package sivan.mybatis;

import org.apache.ibatis.type.JdbcType;

import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

public interface TypeHandler<T> {

    T getResult(ResultSet resultSet, String columnName) throws SQLException;

    T getResult(ResultSet resultSet, int columnIndex) throws SQLException;

    void setParameter(PreparedStatement preparedStatement, int index, T value, JdbcType jdbcType) throws SQLException;
}
